<!--  -->
<template>
    <h1>组件模板</h1>
</template>

<script lang="ts">
import { onBeforeMount, onMounted } from 'vue'
export default {
    name: '',
    setup() {
        console.log('1-开始创建组件-setup')
        onBeforeMount(() => {
            console.log('2.组件挂载页面之前执行----onBeforeMount')
        })
        onMounted(() => {
            console.log('3.-组件挂载到页面之后执行-------onMounted')
        })
    },
}
</script>
<style scoped></style>
